/**
 * @description  券池审批
 * @author shenhong
 */
import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { Row, Col } from 'antd';
import { TableC } from '../../../components';
import style from './index.less';

class DimensionTable extends PureComponent {
  constructor() {
    super();
    this.state = {
      disabled: true,
    };
  }

  componentDidMount() {}

  showTableOne = () => {
    const {
      netValueM: { tableData1 },
      loading,
    } = this.props;
    const { columns } = tableData1;
    const { dataSource } = tableData1;
    return (
      <div>
        <TableC columns={columns} dataSource={dataSource} hidePage={true} rowKey='num' loading={loading} />
      </div>
    );
  };

  showTableTwo = () => {
    const {
      netValueM: { tableData2 },
      loading,
    } = this.props;
    const { columns } = tableData2;
    const { dataSource } = tableData2;
    return (
      <div>
        <TableC columns={columns} dataSource={dataSource} hidePage={true} rowKey='scaleInteval' loading={loading} />
      </div>
    );
  };

  showTableThree = () => {
    const {
      netValueM: { tableData3 },
      loading,
    } = this.props;
    const { columns } = tableData3;
    const { dataSource } = tableData3;
    return (
      <div>
        <TableC
          columns={columns}
          dataSource={dataSource}
          hidePage={true}
          loading={loading}
          // rowKey='money'
        />
      </div>
    );
  };

  render() {
    return (
      <div className={style.tableArea}>
        <Row gutter={16}>
          <Col span={8} className='table_One'>
            {this.showTableOne()}
          </Col>
          <Col span={8} className='table_Two'>
            {this.showTableTwo()}
          </Col>
          <Col span={8} className='table_Three'>
            {this.showTableThree()}
          </Col>
        </Row>
      </div>
    );
  }
}
export default connect(({ netValueM }) => ({
  netValueM,
}))(DimensionTable);
